package com.common.authentication;

import org.springframework.security.authentication.AbstractAuthenticationToken;

/**
 * @Description:
 * @Date: 2025/6/6 15:58
 */
public class Oauth2ModeAuthentication extends AbstractAuthenticationToken {

    private Object businessId;

    public Oauth2ModeAuthentication(Object businessId) {
        super(null);
        this.businessId = businessId;
    }

    private String grantType;

    public String getGrantType() {
        return grantType;
    }

    public void setGrantType(String grantType) {
        this.grantType = grantType;
    }

    @Override
    public Object getCredentials() {
        return businessId;
    }

    @Override
    public Object getPrincipal() {
        return businessId;
    }

    public Object getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Object businessId) {
        this.businessId = businessId;
    }
}
